import styled from 'styled-components'

export const HomeWrapper = styled.div`
  overflow: hidden;
  width: 960px;
  margin: 0 auto;
`

export const HomeLeft = styled.div`
  margin-left: 15px;
  padding-top: 30px;
  width: 625px;
  float: left;
  .banner-img {
    width: 625px;
    height: 270px;
  }
  .split-line {
    margin: -5px 0 15px;
    border-top: 1px solid #f0f0f0;
  }
`

export const HomeRight = styled.div`
  width: 280px;
  float: right;
  padding: 30px 0 0;
  .index-aside-download-qrbox{
    position: relative;
    margin-bottom: 30px;
    padding: 10px 22px;
    width: 100%;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background-color: #fff;
    .qrcode{
      width: 60px;
      height: 60px;
      opacity: .85;
      vertical-align: middle;
    }
    .info{
      display: inline-block;
      vertical-align: middle;
      margin-left: 7px;
      .title{
        font-size: 15px;
        color: #333;
      }
      .description{
        margin-top: 4px;
        font-size: 13px;
        color: #999;
      }
    }
    .bigQR {
      position: absolute;
      opacity: 0;
      visibility: hidden;
      top: -195px;
      left: 50%;
      margin-left: -90px;
      width: 180px;
      height: 180px;
      padding: 10px;
      background-color: #fff;
      transition: all .3s;
      ::after{
        content: '';
        position: absolute;
        width: 0;
        height: 0;
        border: 12px solid transparent;
        border-top-color: #fff;
        left: 50%;
        margin-left: -12px;
        bottom: -24px;
      }
    }
    &:hover{
      .bigQR{
        display: block;
        opacity: 1;
        visibility: visible;
      }
    }
  }
`

export const BackTop = styled.div`
  position: fixed;
  right: 100px;
  bottom: 100px;
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  border: 1px solid #ccc;
  font-size: 14px;
  cursor: pointer;
`

// Topic 的样式组件：
export const TopicWrapper = styled.div`
  overflow: hidden;
  padding: 20px 0 10px 0;
`

export const TopicItem = styled.a`
  height: 32px;
  float: left;
  background-color: #f7f7f7;
  margin: 0 18px 18px 0;
  line-height: 32px;
  color: #000;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  overflow: hidden;

  .topic-pic {
    display: block;
    float: left;
    width: 32px;
    height: 32px;
  }

  .name {
    display: inline-block;
    padding: 0 11px 0 11px;
    font-size: 14px;
    float: left;
  }
`

// List 样式组件
export const ListItem = styled.li`
  position: relative;
  width: 100%;
  margin: 0 0 15px;
  padding: 15px 2px 20px 0;
  border-bottom: 1px solid #f0f0f0;
  word-wrap: break-word;
  .pic{
    position: absolute;
    top: 50%;
    margin-top: -60px;
    right: 0;
    width: 125px;
    height: 100px;
      img {
        width: 100%;
        height: 100%;
        border-radius: 4px;
        border: 1px solid #f0f0f0;
    }
  }
  .content {
    padding-right: 140px;
    .title{
      margin: -7px 0 4px;
      display: inherit;
      font-size: 18px;
      font-weight: 700;
      line-height: 1.5;
      color: #333;
      /* &:visited {
        color: #969696;
      } */
    }
    .abstract{
      margin: 0 0 8px;
      font-size: 13px;
      line-height: 24px;
      color: #999;
    }
  }
`

export const LoadMore = styled.a`
  width: 100%;
  border-radius: 20px;
  background-color: #a5a5a5;
  color: #fff;
  height: 40px;
  line-height: 20px;
  margin: 30px auto 60px;
  padding: 10px 15px;
  text-align: center;
  font-size: 15px;
  cursor: pointer;
  &:hover{
    background-color: #9b9b9b;
  }
`

// Recommed 部分
export const RecommedWrapper = styled.div`
    margin-top: -4px;
    padding-bottom: 4px;
    min-height: 228px;
    img{
      width: 100%;
      min-height: 50px;
      margin-bottom: 6px;
      border-radius: 4px;
    }
`

// Writer 部分
export const WriterWrapper = styled.div`
    margin-bottom: 20px;
    padding-top: 0;
    font-size: 13px;

    .title{
      .text{
        font-size: 14px;
        color: #969696;
      }
      .switch{
        float: right;
        position: relative;
        display: block;
        font-size: 14px;
        color: #969696; 
        cursor: pointer;
        .spin{
          position:absolute;
          left:-17px;
          top:-1px;
          display: inline-block;
          line-height: 1;
          transition: .5s ease;
        }
      }
    }

    .writerItem{
      margin-top: 15px;
      line-height: 20px;
      .avatar{
        float: left;
        width: 48px;
        height: 48px;
        margin-right: 10px;
        img {
          width: 100%;
          height: 100%;
          border: 1px solid #ddd;
          border-radius: 50%;
        }
      }
      .follow {
        float: right;
        margin-top: 5px;
        padding: 0;
        font-size: 13px;
        color: #42c02e;
      }
      .name {
        padding-top: 5px;
        margin-right: 60px;
        font-size: 14px;
        display: block;
      }
      .info {
        margin-top: 2px;
        font-size: 12px;
        color: #969696;
      }
    }
    .find-more{
      padding: 7px 7px 7px 12px;
      width: 100%;
      font-size: 13px;
      color: #787878;
      background-color: #f7f7f7;
      border: 1px solid #dcdcdc;
      border-radius: 4px;
      text-align: center;
      cursor: pointer;
      margin-top: 10px;
    }
`
